package com.kaifamiao.service.Impl;

import com.kaifamiao.mapper.SeatMapper;
import com.kaifamiao.model.SelectSeatModel;
import com.kaifamiao.service.SelectSeatService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service()
@Transactional(propagation = Propagation.REQUIRED)
public class SelectSeatServiceImpl implements SelectSeatService {

    @Autowired
    SeatMapper mapper;

    @Override
    public List<SelectSeatModel> selectOneSeat(int sno,int fno,String rno) {
        return mapper.selectOneSeat(sno,fno,rno);
    }

    @Override
    public List<SelectSeatModel> selectSeat(int fno,String rno) {
        return mapper.selectSeat(fno,rno);
    }

    @Override
    public List<Integer> oKSeat(int fno, String rno) {
        return mapper.oKSeat(fno, rno);
    }

    @Override
    public int updateSeat (int sno,int fno,String rno){
        return mapper.updateSeat(sno,fno,rno);
    }

    @Override
    public int resetSeat(int sno, int fno, String rno) {
        return mapper.resetSeat(sno, fno, rno);
    }

    ;
}
